home *** CD-ROM | disk | FTP | other *** search
- *** ./src/lid.c Tue Aug 6 22:43:28 1996
- --- ../id-utils-3.2/./src/lid.c Mon Jun 15 16:09:37 1998
- ***************
- *** 165,170 ****
- --- 165,174 ----
-
- int radix_flag = radix_all;
-
- + /* vi_flag to print out - cut/paste for vi? */
- +
- + int vi_flag = 0;
- +
- /* If nonzero, ignore differences in alphabetic case while matching. */
-
- int ignore_case_flag = 0;
- ***************
- *** 273,278 ****
- --- 277,283 ----
- is a range expressed as `N..M'. If N is omitted, it\n\
- defaults to 1, if M is omitted it defaults to MAX_USHRT\n\
- -a, --ambiguous=LEN find tokens whose names are ambiguous for LEN chars\n\
- + -v, --vi_output cause the output to allow simple vi cut/paste of files \n\
- \n\
- -x, --hex only find numbers expressed as hexadecimal\n\
- -d, --decimal only find numbers expressed as decimal\n\
- ***************
- *** 301,307 ****
-
- for (;;)
- {
- ! int optc = getopt_long (argc, argv, "f:F:a:k:R:S:ilrwsxdo",
- long_options, (int *) 0);
- if (optc < 0)
- break;
- --- 306,312 ----
-
- for (;;)
- {
- ! int optc = getopt_long (argc, argv, "f:F:a:k:R:S:ilrwsxdov",
- long_options, (int *) 0);
- if (optc < 0)
- break;
- ***************
- *** 371,376 ****
- --- 376,385 ----
- radix_flag |= radix_oct;
- break;
-
- + case 'v':
- + vi_flag = 1;
- + break;
- +
- default:
- usage ();
- }
- ***************
- *** 563,569 ****
- maybe_relative_file_name (file_name, *flinkv++, cw_dlink);
- gid_FILE = fopen (file_name, "r");
- if (gid_FILE == 0)
- ! error (0, errno, "can't open `%s'", file_name);
-
- line_number = 0;
- while (fgets (&line[1], sizeof (line), gid_FILE))
- --- 572,581 ----
- maybe_relative_file_name (file_name, *flinkv++, cw_dlink);
- gid_FILE = fopen (file_name, "r");
- if (gid_FILE == 0)
- ! {
- ! error (0, errno, "can't open `%s'", file_name);
- ! continue;
- ! }
-
- line_number = 0;
- while (fgets (&line[1], sizeof (line), gid_FILE))
- ***************
- *** 579,585 ****
- }
- else if (!word_match (name, line))
- continue;
- ! printf ("%s:%d:%s", file_name, line_number, &line[1]);
- }
- fclose (gid_FILE);
- }
- --- 591,601 ----
- }
- else if (!word_match (name, line))
- continue;
- !
- ! if (vi_flag)
- ! printf ("+%d %s:%s", line_number, file_name, &line[1]);
- ! else
- ! printf ("%s:%d:%s", file_name, line_number, &line[1]);
- }
- fclose (gid_FILE);
- }
-